//
//  GRegistFirstViewController.m
//  土巴兔
//
//  Created by 千锋 on 16/1/18.
//  Copyright (c) 2016年 IOS1503薛凯. All rights reserved.
//

#import "GRegistFirstViewController.h"
#import "UIView+UUTransitionAnimation.h"
@interface GRegistFirstViewController ()
@property (weak, nonatomic) IBOutlet UIButton *admitBtn;
@property (weak, nonatomic) IBOutlet UIView *registfrst;
@property (weak, nonatomic) IBOutlet UIView *registsecond;
@property (weak, nonatomic) IBOutlet UIView *registThird;

@end

@implementation GRegistFirstViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    _registsecond.alpha=0;
    _registThird.alpha=0;
    // Do any additional setup after loading the view from its nib.
}
- (IBAction)admitProtocol:(UIButton *)sender {
    _admitBtn.selected=!_admitBtn.selected;
}
- (IBAction)back:(UIButton *)sender {
    [self dismissViewControllerAnimated:NO completion:nil];
}

- (IBAction)next:(UIButton *)sender {
    [self.view insertSubview:_registsecond aboveSubview:_registfrst];
    [UIView animateWithDuration:1 animations:^{
        [_registfrst setTransitionAnimationType:UUTransitionAnimationTypeCube toward:UUTransitionAnimationTowardFromRight duration:1];
        [_registsecond setTransitionAnimationType:UUTransitionAnimationTypeCube toward:UUTransitionAnimationTowardFromRight duration:1];
        _registsecond.alpha=1;
    }];
}
- (IBAction)secNext:(UIButton *)sender {
    [self.view insertSubview:_registThird aboveSubview:_registsecond];
    [UIView animateWithDuration:1 animations:^{
        [_registThird setTransitionAnimationType:UUTransitionAnimationTypeCube toward:UUTransitionAnimationTowardFromRight duration:1];
        [_registsecond setTransitionAnimationType:UUTransitionAnimationTypeCube toward:UUTransitionAnimationTowardFromRight duration:1];
        _registThird.alpha=1;
    }];
    
}


@end
